<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="moduleList" />
<link rel="stylesheet" href="${staticPath}/lib/ztree/3.5/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script src="${staticPath}/js/jquery-dialog.js" type="text/javascript"></script>
<script type="text/javascript" src="${staticPath}/js/intent/intAssociated_list.js"></script>
<script src="${staticPath}/lib/ztree/3.5/js/jquery.ztree.all-3.5.js" type="text/javascript"></script>
<script type="text/javascript">
var storeId1 = "${intLeaseociated.storeId}"
var floorId1 = "${intLeaseociated.floorId}"
var navId ='${navId}'
</script>
<script type="text/javascript" src="${staticPath}/js/contract_list.js"></script>

<style type="text/css">
	#myModal .modal-dialog  {width:60%;}
</style>
</head>
<body>
	<form id="intLeaseociatedForm" name="listForm" action="${contextPath}/biz/intent/intLeaseociated/list?navId=${navId}" method="post" class="form-inline" role="form">
		<ol class="breadcrumb map_1">
			<li><a href="${contextPath}/index">首页</a></li>
			<li><a href="${contextPath}/biz/intent/intAssociated/list?navId=${navId}">招商合约</a></li>
			<li class="active">租赁意向合同列表</li>
			
		</ol>
			<div class="o-l-search-builder f_1">
			<input type="hidden" id="contractType" value="intLeaseociated">
			<input type="hidden" id="contract_type" value="intLeaseociated">
			<input type="hidden" id="isListJsp" value="true">
	         	<div id="statement-search-builder" class="collapse" style="height:auto;">
	            	<div class="f_2">
	            		<div class="form-group col-sm-6">
	             			<label for="createBy" class="col-sm-3 control-label f_4">创建人：</label>
	             			<div class="col-sm-9 f_6">
	             				<div class="input-group">
	             		 			<input type="hidden" id="createById" maxlength="200" name="createBy" value="${intAssociated.createBy}" readonly="true" class="f_5 required" />
	                     			<input type="text" class="f_5" id="createBy"  placeholder="合同创建人">
	                     			<span class="input-group-addon f_time"><a onclick="cleanCreateBy()" href="javascript:void"><i class="glyphicon glyphicon-remove"></i></a></span>
	                     			<span class="input-group-btn">
									<button class="btn btn-default btn_3" id="userDialogMultiple"
									data-dialog="dialog" data-multiple="true"
									data-idField="createById" data-nameField="createBy"
									data-authType="USER" type="button">选择</button>
									</span>
	                     		</div>
	                     </div>
	               		</div>
	               		<div class="form-group col-sm-6">
	                      <label for="contractStatus" class="col-sm-3 control-label f_7">意向单状态：</label>
	                      <div class="col-sm-9 f_6">
	                          <ossp:select dictType="INTENT_STATUS" class_="f_5" id="status" name="status" value="${intAssociated.status}"></ossp:select>
	                      </div>
	                  </div>
	            	</div>
	            	<div class="f_3">
	                 <div class="form-group col-sm-6">
	                      <label for="inputtext3" class="col-sm-3 control-label f_4">区域：</label>
	                       <div class="col-sm-9 f_6">
	                       	<div class="input-group">
	                       		<input type="hidden" id="areaId"  name="areaId" value="${intAssociated.areaId}"/> 
								<input type="text" class="f_5" id="area" readonly="readonly" name="area" value="${intAssociated.area}">
								<span class="input-group-addon f_time"><a id="clean" href="#"><i class="glyphicon glyphicon-remove"></i></a></span>
								<span class="input-group-btn">
									<button class="btn btn-default btn_3" id="areaBtn"
									 type="button">选择</button>
									</span>
							</div>
						 </div>
	                  </div>
	                  <div class="form-group col-sm-6">
	                      <label for="contractAttribute" class="col-sm-3 control-label f_7">合同文本：</label>
	                      <div class="col-sm-9 f_6">
	                         <ossp:select dictType="isContractModify" class_="f_5" id="	isContractModify" name="isContractModify" value="${intAssociated.area}"></ossp:select>
	                      </div>
	                  </div>
	             </div>
	             <div class="f_2">
	             	<div class="form-group col-sm-6">
	                      <label for="contractAttribute" class="col-sm-3 control-label f_7">是否变更：</label>
	                      <div class="col-sm-9 f_6">
	                         <ossp:select dictType="YESORNO" class_="f_5" id="isModifyContract" name="isModifyContract" value="${intAssociated.isModifyContract}"></ossp:select>
	                      </div>
	                  </div>
	                  <div class="form-group col-sm-6">
	                      <label for="contractAttribute" class="col-sm-3 control-label f_7">意向类型：</label>
	                      <div class="col-sm-9 f_6">
	                         <ossp:select dictType="CONTRATC_ATTRIBUTE" class_="f_5" id="intentType" name="intentType" value="${intAssociated.intentType}"></ossp:select>
	                      </div>
	                  </div>
	             </div>
	             
	            <div class="f_3">
	                 <div class="form-group col-sm-6">
	                      <label for="store" class="col-sm-3 control-label f_4">门店名：</label>
	                      <div class="col-sm-9 f_6">
	                        <select type="text" class="f_5" id="storeId" name="storeId">
	                        	<c:if test="${not empty intAssociated.storeId}">
	                        		<option value="${intAssociated.storeId}" selected="selected" >${intAssociated.store}</option>
	                        	</c:if>
	                        </select>
	                        <input type="hidden"  id="store" name="store" />
	                      </div>
	                  </div>
	                  <div class="form-group col-sm-6">
	                      <label for="floorId" class="col-sm-3 control-label f_7">楼层：</label>
	                      <div class="col-sm-9 f_6">
	                        <select type="email" class="f_5" id="floorId" name="floorId">
	                        	<option value="">---请选择---</option>
	                        	<c:if test="${not empty intAssociated.floorId}">
	                        		<option value="${intAssociated.floorId}" selected="selected">${intAssociated.floor}</option>
	                        	</c:if>
	                        </select>
	                        <input type="hidden" path="floor" id="floor" name="floor"/>
	                      </div>
	                  </div>
	             </div>	
	              <div class="f_2">
	                 <div class="form-group col-sm-6">
	                      <label for="inputEmail3" class="col-sm-3 control-label f_4">开始时间：</label>
	                      <div class="col-sm-9 f_6">
	                        <div class="input-group date o-a-form-datetime" data-date="" data-date-format="yyyy-mm-dd">
	                            <input class="form-control f_13" type="text" readonly id="startDate" name="startDate"/>
	                            <span class="input-group-addon f_time"><i class="glyphicon glyphicon-remove"></i></span>
	                            <span class="input-group-addon f_time"><span class="glyphicon glyphicon-calendar"></span></span>
	                        </div>
	                      </div>
	                  </div>
	                  <div class="form-group col-sm-6">
	                      <label for="inputEmail3" class="col-sm-3 control-label f_7">结束时间：</label>
	                      <div class="col-sm-9 f_6">
	                        <div class="input-group date o-a-form-datetime" data-date="" data-date-format="yyyy-mm-dd">
	                            <input class="form-control f_13" type="text" readonly id="endDate" name="endDate"/>
	                            <span class="input-group-addon f_time"><i class="glyphicon glyphicon-remove"></i></span>
	                            <span class="input-group-addon f_time"><span class="glyphicon glyphicon-calendar"></span></span>
	                        </div>
	                      </div>
	                  </div>
	             </div>
	            </div>
	            <div class="f_8">
	              <div class="f_2">
	                  <div class="col-sm-4 f_6">
	                       <input id="contractNo" type="text" name="intentNo" placeholder="意向单号" class="f_5"/>
	                  </div>
	                   <div class="col-sm-4 f_6">
	                       <input id="brandCName" type="text" name="intAssbrandsList[0].brandCName" placeholder="品牌中文名" value="${brandCName}" class="f_5"/>
	                  </div>
	                  <button type="button" id="queryBtn" class="btn btn-warning btn_1">查&nbsp&nbsp;询</button>
	                  <button type="button" onclick="cleanAll()" class="btn btn-warning btn_1">重&nbsp&nbsp;置</button>
	             </div>
	         </div>
	            <div class="o-l-chevron-down"><a href="#" class="btn btn-default collapsed" data-toggle="collapse" data-target="#statement-search-builder" id="chevronDownBtn" role="button"><span id="glyphiconspan" class="glyphicon glyphicon-chevron-down"></span></a>
	         </div>
	        </div>
		<div class="o-l-search-builder f_1">
		<shiro:hasPermission name="com.maoye.ossp.biz.contract.intent.IntLeaseociated:delete">
			<button class="btn btn-danger btn_3 btn_right" type="button" onclick="Oosp_DelChked('${contextPath}/biz/intent/intLeaseociated/ids/removeBatch?navId=${navId}&pageNo=${page.pageNo}','table1','ids')">删除</button>
			</shiro:hasPermission>
<!-- 			<a class="btn btn-success btn_3 btn_right" role="button" id="addBtn">新建</a>
 -->		</div>
		<tags:message content="${message}"/>
		<div class="o-l-search-builder f_9">
			<table class="table table-striped table-hover o-l-table table-bordered" id="table1">
			<thead class="t_1">
				<tr>
					<th style="width: 1px"><input type="checkbox" data-ckb="all"></th>
					<th>单号</th>
					<th>品牌</th>
					<th>供应商名称</th>
					<th>门店</th>
					<th>创建人</th> 
					<th>创建时间</th>
					<th>意向类型</th>
					<th>变更</th> 
					<th>状态</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${page.list}" var="intAssociated">
					<tr data-herf="${contextPath}/biz/intent/intLeaseociated/${intAssociated.id}/view?navId=${navId}&pageNo=${page.pageNo}" data-target="_self">
						<td class="o-l-tab-ckb">
							<input type="checkbox" data-ckb-id="${intAssociated.id}"value="${intAssociated.id}" onselect="alertId()">
						</td>
						<td title="${intAssociated.intentNo}">${intAssociated.intentNo}</td>
						<td  title='<c:forEach items="${intAssociated.intAssbrandsList }" var="assbrands">
									<c:if test="${assbrands.isMainBrand =='1'}">
										${assbrands.brandCName }
									</c:if>
								</c:forEach>'>
							<div STYLE="width: 70px; overflow: hidden; text-overflow: ellipsis">
								<nobr><c:forEach items="${intAssociated.intAssbrandsList }" var="assbrands">
									<c:if test="${assbrands.isMainBrand =='1'}">
										${assbrands.brandCName }
									</c:if>
								</c:forEach></nobr>
							</div>
						</td>
						<td title="${intAssociated.supplierName}">
							<div STYLE="width: 70px; overflow: hidden; text-overflow: ellipsis">
								<nobr>${intAssociated.supplierName}</nobr>
							</div>
						</td>
						<td title="${intAssociated.store}">
							<div STYLE="width: 70px; overflow: hidden; text-overflow: ellipsis">
								<nobr>${intAssociated.store}</nobr>
							</div>
						</td>
						<td title="${intAssociated.createBy}">${intAssociated.createBy}</td> 
						<td title='<fmt:formatDate value="${intAssociated.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>'><fmt:formatDate value="${intAssociated.createTime}" pattern="yyyy-MM-dd HH:mm"/></td>
						<td title='<ossp:value dictType="CONTRATC_ATTRIBUTE" key="${intAssociated.intentType}"></ossp:value>'><ossp:value dictType="CONTRATC_ATTRIBUTE" key="${intAssociated.intentType}"></ossp:value></td>
						<td title='<ossp:value dictType="YESORNO" key="${intAssociated.isModifyContract}"></ossp:value>'><ossp:value dictType="YESORNO" key="${intAssociated.isModifyContract}"></ossp:value></td>
						<td title='<ossp:value dictType="INTENT_STATUS" key="${intAssociated.status}"></ossp:value>'><ossp:value dictType="INTENT_STATUS" key="${intAssociated.status}"></ossp:value></td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
		</div>
		<pager:pager pageSize="${page.pageSize}" pageNo="${page.pageNo}" url="" total="${page.total}"/>
	<!-- Modal -->
			<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		</div>
		<script type="text/javascript">
			$('.o-a-form-datetime').datetimepicker({
		        language:  'zh-CN',
		        weekStart: 1,
		        todayBtn:  1,
				autoclose: 1,
				todayHighlight: 1,
				startView: 2,
				minView: 2,
				forceParse: 0,
				format: 'yyyy-mm-dd'
		    });
		
		</script>
 		<script type="text/javascript" src="${staticPath}/js/list.js"></script>  			
	</form>
</body>
</html>